#ifndef CLIENT_H
#define CLIENT_H

#include <QWidget>
#include <QTcpSocket>
#include <QLineEdit>
#include <QTextEdit>
#include <QLineEdit>
#include <QPushButton>
#include <QLabel>

class Client : public QWidget
{
    Q_OBJECT
public:
    explicit Client(QWidget *parent = 0);
    ~Client();

protected slots:
    void connectServer();
    void readMsg();
    void sendMsg();
    void serverConnected();
    void serverDisconnected();
private:
    QTcpSocket* m_tcpSocket;
    QLineEdit* sendLineEdit;
    QTextEdit* recvTextEdit;
    QPushButton* sendBtn, *connectBtn;
    QLineEdit *ipLineEdit, *portLineEdit;
    QLabel *statusLabel;
};

#endif // CLIENT_H
